﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Main.Master" AutoEventWireup="true" CodeBehind="PositionConfig.aspx.cs" Inherits="NetDon.OA.Portal.Admin.PositionConfig" %>
<%@ Import Namespace="NetDon.OA.Portal.Constants" %>
<%@ Register Assembly="NineRays.WebControls.FlyTreeView" Namespace="NineRays.WebControls"
    TagPrefix="NineRays" %>
<%@ Register TagPrefix="uc2" TagName="RequiredMark" Src="~/Controls/RequiredMark.ascx" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script language="javascript" type="text/javascript">
        function SelectedNodeChanged() {
            $get('<%=btnModify.ClientID %>').click();
        }
        function pageCommand(args) {
            if (args.get_commandName() == '<%=ButtonConstants.CommandNames.Delete %>') {
                if (!args.get_commandArgument()) {
                    $confirm('确认删除该职位吗？', function (result) {
                        if (result) {
                            __doCommand('<%=ButtonConstants.CommandNames.Delete %>', treeview.getSelectedNode().getValue(), false, '');
                        }
                    });
                    args.set_cancel(true);
                }
            }
        }
        var treeview;
        function flyTreeView_onInitialized(treeviewObject) {
            treeview = treeviewObject;
        }
                         
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <%--<asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate> </ContentTemplate>
    </asp:UpdatePanel>--%>
    <table border="0" cellpadding="0" cellspacing="0">
        <tr>
            <td valign="top">
                <NineRays:FlyTreeView ID="treeCompany" Width="280px" runat="server"
                    DrawLines="true" ContentClickExpands="false" OnPopulateNodes="treeCompany_PopulateNodes"
                    OnInitializedJavascript="flyTreeView_onInitialized" OnSelectedNodeChangedJavascript="SelectedNodeChanged">
                </NineRays:FlyTreeView>
            </td>
            <td valign="top">
          
                        <NetDon:FormPanel ID="pnlCompanyInfo" runat="server" RepeatColumns="1" Visible="false">
                            <Items>
                                <NetDon:FormItem HeaderText="父岗位" ColumnSpan="2">
                                    <ContentTemplate>
                                        <asp:TextBox ID="txtParentName" BackColor="LightSkyBlue" ReadOnly="true" runat="server"></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtParentName"
                                            Display="None" ErrorMessage="请输入父岗位名称" SetFocusOnError="True"></asp:RequiredFieldValidator>
                                    </ContentTemplate>
                                </NetDon:FormItem>
                               
                                <NetDon:FormItem HeaderText="岗位名称">
                                    <ContentTemplate>
                                        <asp:TextBox ID="txtPostName" runat="server" MaxLength="254"></asp:TextBox>
                                        <uc2:RequiredMark ID="RequiredMark2" runat="server" />
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtPostName"
                                            Display="None" ErrorMessage="请输入岗位名称" SetFocusOnError="True"></asp:RequiredFieldValidator>
                                    </ContentTemplate>
                                </NetDon:FormItem>
                                
                                <NetDon:FormItem HeaderText="岗位等级">
                                    <ContentTemplate>
                                       <asp:DropDownList ID="ddlPostLevel" runat="server" AppendDataBoundItems="True" DataSourceID="ddsPostLevel"
                                        DataTextField="Name" DataValueField="Value" >
                                    </asp:DropDownList>
                                    <NetDon:DictionaryDataSource ID="ddsPostLevel" runat="server" CategoryName="岗位等级"
                                        EmptyItemType="Select">
                                    </NetDon:DictionaryDataSource>
                                     
                                    </ContentTemplate>
                                </NetDon:FormItem>
                              
                               
                                <NetDon:FormItem HeaderText="描述" FullRow="True">
                                    <ContentTemplate>
                                         <asp:TextBox ID="txtNodeLevel" runat="server" Visible="false" ></asp:TextBox>
                                        <FTB:FreeTextBox ID="txtDescription" runat="server" Height="250px" Width="540px">
                                        </FTB:FreeTextBox>
                                    </ContentTemplate>
                                </NetDon:FormItem>
                            </Items>
                        </NetDon:FormPanel>
     
                  
            </td>
        </tr>
    </table>
    <div style="margin-top: 10px; text-align: center">
        <asp:ValidationSummary ID="ValidationSummary1" runat="server" DisplayMode="List"
            ShowMessageBox="True" ShowSummary="False" />
    </div>
    <asp:Button ID="btnModify" runat="server" OnClick="btnModify_Click" Style="display: none"
        CausesValidation="False" />
</asp:Content>